package com.gwamcc.adduser.dao;

import org.apache.ibatis.annotations.Param;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

/**
 * Created by Administrator on 2020/6/15.
 */
public interface OperateDao {

    //新增保存Employee
    public void addEmployee(@Param("empid") String empid, @Param("account") String account, @Param("name") String name);
    public void addOrganize(@Param("orgid") String orgid, @Param("orgname") String orgname, @Param("code") String code, @Param("orderid") String orderid);
    public void addPartTimeJob(@Param("orgempid") String orgempid, @Param("empid") String empid);
    public void addOrganizeEmployee(@Param("empid") String empid, @Param("orgid") String orgid, @Param("orderid") String orderid);

    //删除Employee；逻辑删除非物理删除；可批量操作
    public void delEmployee(ArrayList<String> empid);
    public void delOrganize(ArrayList<String>  orgid);
    public void delPartTimeJob(ArrayList<String>  empid);
    public void delOrganizeEmployee(ArrayList<String>  empid);

    //更新Employee
    public void updEmployee(@Param("empid") String empid, @Param("account") String account, @Param("name") String name);
    public void updOrganize(@Param("orgid") String orgid, @Param("orgname") String orgname, @Param("code") String code);
    public void updPartTimeJob(@Param("empid") String empid);
    public void updOrganizeEmployee(@Param("empid") String empid);

    //模糊查询Employee；查询条件：Emp_ID,Name,Account,Org_ID,Orgname
    public List<Map<String, Object>> queryByEmpid(@Param("whereSql") String whereSql);
    public List<Map<String, Object>> queryByName(@Param("whereSql") String whereSql);
    public List<Map<String, Object>> queryByAccount(@Param("whereSql") String whereSql);
    public List<Map<String, Object>> queryByOrgid(@Param("whereSql") String whereSql);
    public List<Map<String, Object>> queryByOrgname(@Param("whereSql") String whereSql);
}
